package org.qydjk.common.pojo;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "qy_user_store_card", schema = "qydjk", catalog = "")
public class UserStoreCard {
    private Integer id;
    private Integer userId;
    private Integer storeCardId;
    private Integer storeCardCategoryId;
    private String code;
    private String pwd;
    private BigDecimal val;
    private Date createTime;
    private Date updateTime;
    private String status;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_Id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "store_card_id")
    public Integer getStoreCardId() {
        return storeCardId;
    }

    public void setStoreCardId(Integer storeCardId) {
        this.storeCardId = storeCardId;
    }

    @Basic
    @Column(name = "store_card_category_id")
    public Integer getStoreCardCategoryId() {
        return storeCardCategoryId;
    }

    public void setStoreCardCategoryId(Integer storeCardCategoryId) {
        this.storeCardCategoryId = storeCardCategoryId;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "pwd")
    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Basic
    @Column(name = "val")
    public BigDecimal getVal() {
        return val;
    }

    public void setVal(BigDecimal val) {
        this.val = val;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserStoreCard that = (UserStoreCard) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (storeCardId != null ? !storeCardId.equals(that.storeCardId) : that.storeCardId != null) return false;
        if (storeCardCategoryId != null ? !storeCardCategoryId.equals(that.storeCardCategoryId) : that.storeCardCategoryId != null)
            return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (pwd != null ? !pwd.equals(that.pwd) : that.pwd != null) return false;
        if (val != null ? !val.equals(that.val) : that.val != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (storeCardId != null ? storeCardId.hashCode() : 0);
        result = 31 * result + (storeCardCategoryId != null ? storeCardCategoryId.hashCode() : 0);
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (pwd != null ? pwd.hashCode() : 0);
        result = 31 * result + (val != null ? val.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        return result;
    }
}
